package MyImages;
use File::Temp qw/ tempfile tempdir /;

sub load_image {
    my $image_name = shift;
    use PAR;# { file => 'a.exe' };
    my $fh;
    my $filename;
    if (my $image = PAR::read_file($image_name)) { # reads from the ZIP
        ($fh, $filename) = tempfile();
        print $fh $image;
    } else {
        $filename = $image_name;
    }
    return $filename;
}


1;